package com.gengzp.gateway;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;

/**
 * @ClassName GatewayApplication
 * @Description 网关服务启动类
 * @Author gengzp
 * @Date 2025/9/22 19:32
 */
@SpringBootApplication(exclude = {
        DataSourceAutoConfiguration.class,        // 排除数据源自动配置
        DataSourceTransactionManagerAutoConfiguration.class  // 排除事务管理器自动配置
})
@ComponentScan({"com.gengzp.gateway","com.gengzp.rpc"})
public class GatewayApplication {

    private static final Logger logger = LoggerFactory.getLogger(GatewayApplication.class);

    public static void main(String[] args) {
        long startTime = System.currentTimeMillis();
        SpringApplication.run(GatewayApplication.class, args);
        logger.info("============== 网关服务 gateway 启动完成, 耗时: {}ms ==============",
                System.currentTimeMillis() - startTime);
    }

}
